#include <iostream>
#include <string>
#include <vector>
#include "assert.h"
#include "split_string.h"
#include "split_string_test.h"
using std::vector;
using std::string;
using std::cout;
using std::endl;

void SplitStringTest::testSplitNormal()
{
	string testWord = "|00|abc12|||3|,.!|";
	vector<string> oriResWord;
	string temp;
	temp="00";
	oriResWord.push_back(temp);
	temp="abc12";
	oriResWord.push_back(temp);
	temp="3";
	oriResWord.push_back(temp);
	temp=",.!";
	oriResWord.push_back(temp);
	
	char c='|';
	vector<string> testResWord=split(testWord,c);

	assertEqual(oriResWord,testResWord);
	cout << "testSplitBlank() OK!" << endl;
	
}

void SplitStringTest::testSplitBlank()
{
	string testWord = "";
	vector<string> oriResWord;
	
	char c='|';
	vector<string> testResWord=split(testWord,c);
	
	assertEqual(oriResWord,testResWord);
	cout << "testSplitBlank() OK!" << endl;

}


